<?php

namespace App\Http\Requests\Backend;

class DesignerRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required',
            'thumb' => 'required',
            'sort' => 'required',
            'is_show' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'name.required' => '请输入标题',
            'thumb.required' => '请上传图片',
            'sort.required' => '请输入排序',
            'is_show.required' => '请选择是否显示',
        ];
    }

    public function filldata()
    {
        return [
            'name' => $this->input('name'),
            'thumb' => $this->input('thumb'),
            'job_name' => $this->input('job_name'),
            'good_style' => $this->input('good_style'),
            'awards' => $this->input('awards'),
            'design_idea' => $this->input('design_idea'),
            'sort' => $this->input('sort'),
            'is_show' => $this->input('is_show'),
            'work_room' => $this->input('work_room'),
        ];
    }
}
